<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2023/10/17
 * Time: 17:47
 */

namespace app\controller\index\douyin;

use app\controller\CoreController;
use app\logic\index\douyin\DouYinAppLogic;
use support\Request;
use support\Response;

class OpenAppController extends CoreController
{
    public function createAgent(Request $request):Response
    {
        $param = [];
        $data = DouYinAppLogic::getInstance()->createAgent();
        return $this->endSuccess($data);
    }

    public function getTaskId(Request $request)
    {
        $param = [];
        $param['appid'] = $request->input('appid','tt566620dbc959b75701');
        $data = DouYinAppLogic::getInstance()->getTaskId($param);
        return $this->endSuccess($data);
    }

    public function getTaskDetail(Request $request)
    {
        $param = [];
        $data = DouYinAppLogic::getInstance()->getTaskDetail();
        return $this->endSuccess($data);
    }

    public function getCooperateLink(Request $request)
    {
        $param = [];
        $data = DouYinAppLogic::getInstance()->getCooperateLink();
        return $this->endSuccess($data);
    }

    public function searchBindRecord(Request $request)
    {
        $param = [];
        $data = DouYinAppLogic::getInstance()->searchBindRecord();
        return $this->endSuccess($data);
    }

}